//
//  MGFaceManager.h
//  MGFaceDetection
//
//  Created by megvii on 15/12/22.
//  Copyright © 2015Year megvii. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MGLiveDetectionManager.h"
#import "MGLiveConfig.h"
#import <MGBaseKit/MGLicenseManager.h>

NS_ASSUME_NONNULL_BEGIN

@interface MGLiveManager : MGLicenseManager

+ (instancetype)share;

/**
 Set the flag indicating action sequence random or not.

 @param random The flag.
 */
- (void)setActionRandom:(BOOL)random;

typedef NSString *NWDActionGesture;

/**
 Set the action sequence.

 @param actionArray action sequence
 */
- (void)setActionArray:(NSArray<NWDActionGesture> *_Nonnull)actionArray;

FOUNDATION_EXPORT NWDActionGesture const NWDActionGestureBlink;
FOUNDATION_EXPORT NWDActionGesture const NWDActionGestureOpenMouth;
FOUNDATION_EXPORT NWDActionGesture const NWDActionGestureShakeHead;
FOUNDATION_EXPORT NWDActionGesture const NWDActionGestureNodHead;

@property (nonatomic, copy, readonly) NSArray<NWDActionGesture> *actionArray;

/**
 *  启动检测器
 *
 *  @param viewController 开启活体检测器的 viewcontroller
 *  @param configuration  界面配置
 *  @param finish         成功的回调
 *  @param error          失败的回调
 *  @param cancel          取消的回调
 */
- (void)startFaceDetectionViewController:(UIViewController * __nonnull)viewController
                                ClientID:(NSString*)ClientID
                       ClienclientSecret:(NSString*)clientSecret
                         UIconfiguration:(UIConfigurationHandler)configuration
                                  finish:(faceSuccess _Nullable )finish
                                   error:(void(^_Nullable)(MGLivenessDetectionFailedType errorType, UIViewController * _Nonnull vc))error
                                  cancel:(CancelHandler _Nullable)cancel;
@end

NS_ASSUME_NONNULL_END
